﻿@{
    ViewBag.Title = "充值查询";
    ViewBag.Menu = "order";
    ViewBag.Tree = "order";
    ViewBag.Logout = "/order/querypage";
    Layout = "~/Views/Shared/_RechargeLayout.cshtml";
    bool error = !string.IsNullOrWhiteSpace(Convert.ToString(ViewData["error"])) ? true : false;
}
@{
    if (error)
    {
        <div class="pos"><img src="~/images/images/pay_dian.jpg" /> <a href="#">充值中心</a> - 登录到充值的网站</div>
        <div id="czcp">
         @Html.Partial("../Shared/_LoginPartial");
        </div>
    }
    else
    {
<div class="pos"><img src="~/images/images/pay_dian.jpg" /> <a href="#">充值中心</a> - 充值明细</div>      
<div id="czcp">
    <div class="form2">
    <table class="tab3" width="720">
        <tbody>
            <tr bgcolor="#e9e9e9">
        	    <th>下单时间</th>
			    <th>订单号</th>
			    <th>充值区服</th>
			    <th>充值金额</th>
			    <th>充值状态</th>
            </tr>
            @{
        IDictionary<string, Framework.Common.Entry.KeyValueEntry<string, decimal>> source = (IDictionary<string, Framework.Common.Entry.KeyValueEntry<string, decimal>>)ViewData["source"];
        IDictionary<byte, object> status = (IDictionary<byte, object>)ViewData["orderstatus"];
        var list = (IOrderedEnumerable<Extention.IService.Entry.OrderEntry>)ViewData["list"];
        if (list != null)
        {
            foreach (var entry in list)
            {
                                                <tr>
                                                    <td>@(DateTime.Parse(entry.indate).ToString("yyyy-MM-dd HH:mm:ss"))</td>
                                                    <td>@entry.orderCode</td>
                                                    <td>@(source.ContainsKey(entry.sourceCode) ? source[entry.sourceCode].key : string.Empty)</td>
                                                    <td>@entry.amount</td>
                                                    <td>@(status.ContainsKey(entry.status) ? status[entry.status] : string.Empty)</td>
                                                </tr>
            }
        }
            }
            </tbody>
        </table>
    </div>
</div>
    }
    
    }

		

